-- GENERATED SPELL FOR [Netherskate] --


function spell0_21901(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(17008,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_21901', 5000, 1)
end

function spell1_21901(pUnit, Event) --@Nether Shock,n/a--
pUnit:FullCastSpellOnTarget(35334,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21901', 3349, 1)
end

function spell2_21901(pUnit, Event) --@Tail Sting,n/a--
pUnit:FullCastSpellOnTarget(36659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21901', 16000, 1)
end

function Sorts_21901(pUnit, Event)
local choix_sorts_21901 = math.random(0, 2)
if choix_sorts_21901 == 0 then
pUnit:RegisterEvent('spell0_21901', 1, 1)
end
if choix_sorts_21901 == 1 then
pUnit:RegisterEvent('spell1_21901', 1, 1)
end
if choix_sorts_21901 == 2 then
pUnit:RegisterEvent('spell2_21901', 1, 1)
end
end

function mob21901_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21901', math.random(1500, 3000), 1)
end

function mob21901_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21901_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21901_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21901, 1, 'mob21901_Action')
RegisterUnitEvent(21901, 2, 'mob21901_Leave')
RegisterUnitEvent(21901, 3, 'mob21901_Kill')
RegisterUnitEvent(21901, 4, 'mob21901_Die')
